package com.tian.config;

import org.redisson.api.RedissonClient;

/**
 * {@code @description:} TODO
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2025-02-20 11:08
 * {@code @version:} 1.0
 */
public class DeleteCacheTask implements Runnable {

    private final RedissonClient redissonClient;
    private final String key;

    public DeleteCacheTask(RedissonClient redissonClient, String key) {
        this.redissonClient = redissonClient;
        this.key = key;
    }
    @Override
    public void run() {
        redissonClient.getBucket(key).delete();
    }
}
